{{template "base" .}}

{{define "content"}}
<article class="post-detail">
    <header class="post-header">
        <h1 class="post-title">{{.post.Title}}</h1>
        <div class="post-meta">
            <span class="post-date">{{.post.CreateTime.Format "2006-01-02 15:04"}}</span>
            <span class="post-category">{{.post.Type.Name}}</span>
            <span class="post-views">{{.post.ReadCount}} 阅读</span>
        </div>
        <div class="post-tags">
            {{range .post.Tags}}
            <span class="tag">{{.Name}}</span>
            {{end}}
        </div>
    </header>

    <div class="post-content">
        {{.post.Content}}
    </div>

    <footer class="post-footer">
        <div class="post-navigation">
            <a href="/" class="back-home">← 返回首页</a>
        </div>
    </footer>
</article>
{{end}}